package demo;

import java.text.DateFormat;
import java.util.Date;

public class DateFormatDemo {

	public static void main(String[] args) {
DateFormat d1 = DateFormat.getDateTimeInstance();
System.out.println("DateTime:"+d1.format(new Date()));
DateFormat d2 = DateFormat.getDateInstance();
System.out.println("Date:"+d2.format(new Date()));

	}

}
